<?

	session_start( );

	include_once( "../JO_01_configuration.php"	);
	include_once( "../JO_02_function.php"		);



	////
	///
	//	Authority

		// ...



	//include_once( "SO_01_configuration.php"	);
	include_once( "SO_02_function.php"			);
	//include_once( "SO_03_JS.php"				);
	//include_once( "SO_04_CSS.php"				);

?>



<style>

	body {

		margin:			0px;
		padding:		0px;
		color:			#7D7D7D;
		font-size:		11px;
		font-family:	Tahoma;
		line-height:	15px;

	}

</style>



<?

	if( $_REQUEST[ "SO_query" ] ) {

		//foreach( $_REQUEST as $key => $value ) $_REQUEST[ $key ] = addslashes( trim( $value ) );
		foreach( $_REQUEST as $key => $value ) $_REQUEST[ $key ] = str_replace( "'", "&#039;", trim( $value ) );

		$JO_MySQL = new mysqli( $JO_DB_host, $JO_DB_user, $JO_DB_password, $JO_DB_database );
		$JO_MySQL -> query( "SET NAMES 'UTF8'" );

		switch( $_REQUEST[ "SO_query" ] ) {

			case "task_insert"		: SO_task_insert(			); break;
			case "task_update"		: SO_task_update(			); break;
			case "task_report"		: SO_task_report(			); break;

			case "index_insert"		: SO_index_insert(			); break;
			case "index_update"		: SO_index_update(			); break;

			case "content_insert"	: SO_content_insert(		); break;
			case "content_update"	: SO_content_update(		); break;
			
			case "show_insert"		: SO_show_insert(			); break;
			case "show_update"		: SO_show_update(			); break;
			case "show_delete"		: SO_show_delete(			); break;
			
			case "category_insert"  : SO_show_category_insert(	);break;
			case "category_update"  : SO_show_category_update(	);break;
			case "category_delete"  : SO_show_category_delete(	);break;
			
			case "insert_recommendation"    : JO_insert_recommendation (    );break;
			case "update_recommendation"    : JO_update_recommendation (    );break;
			case "delete_recommendation"    : JO_delete_recommendation (    );break;
			case "import"    : import (    );break;
			case "SaveTop"   				: JO_Save_Top (    );break;

		}

		if( $JO_MySQL ) $JO_MySQL -> close( );

	}

?>
